@extends('plugin.layout.base')
@section('add_css')

@endsection
@section('content')


    <div class="layui-col-md12">
        <div class="layui-card">

            <div class="layui-card-body">
                <div class="layui-form layui-form-kongqi" lay-filter="">

                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title">
                            <li class="layui-this">网站设置</li>
                            <li class="">统计代码</li>
                            <li class="">SEO</li>
                            <li class="">站长信息</li>
                            <li class="">关于我们</li>
                            <li class="">邮件通知</li>
                            <li class="">域名设置</li>


                        </ul>

                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">

                                @include('plugin.tpl.form.thumbPlace',[
                                  'data'=>[
                                      'name'=>'logo',
                                      'value'=>$logo??'',
                                      'show'=>$logo??0,
                                      'title'=>'Logo',
                                      'tips'=>'',
                                      'rq'=>'',
                                      'place'=>1,
                                      'obj'=>'logoUpload'
                                  ]])
                                @include('plugin.tpl.form.thumbPlace',[
                                 'data'=>[
                                     'name'=>'user_logo',
                                     'value'=>$user_logo??'',
                                     'show'=>$user_logo??0,
                                     'title'=>'会员中心Logo',
                                     'tips'=>'',
                                     'rq'=>'',
                                     'place'=>1,
                                     'obj'=>'user_logoUpload'
                                 ]])
                                @include('plugin.tpl.form.thumbPlace',[
                                  'data'=>[
                                      'name'=>'favicon',
                                      'value'=>$favicon??'',
                                      'show'=>$favicon??0,
                                      'title'=>'favicon图标',
                                      'tips'=>'',
                                      'type'=>'file',
                                      'rq'=>'',
                                      'place'=>1,
                                      'obj'=>'faviconUpload'
                                  ]])

                                @include('plugin.tpl.form.text',[
                                   'data'=>[
                                             'name'=>'site_name',
                                             'title'=>'站点名称',
                                             'tips'=>'',
                                             'value'=>$site_name?? '',
                                             'rq'=>''
                                 ]])

                                @include('plugin.tpl.form.text',[
                                    'data'=>[
                                              'name'=>'version_name',
                                              'title'=>'缓存号',
                                              'tips'=>'',

                                              'value'=>$version_name?? '',
                                              'rq'=>''
                                  ]])
                                @include('plugin.tpl.form.text',[
                                   'data'=>[
                                             'name'=>'domain',
                                             'title'=>'绑定域名',
                                             'tips'=>'',
                                             'value'=>$domain ?? '',
                                             'mark'=>'',
                                             'rq'=>''
                                     ]])


                                @include('plugin.tpl.form.text',[
                                 'data'=>[
                                           'name'=>'path',
                                           'title'=>'绑定前台路径',
                                           'tips'=>'',
                                           'value'=>$path ?? '/',
                                           'rq'=>''
                                   ]])

                                @include('plugin.tpl.form.text',[
                                 'data'=>[
                                           'name'=>'icp',
                                           'title'=>'ICP备案号',
                                           'tips'=>'',
                                           'value'=>$icp?? '',
                                           'rq'=>''
                               ]])
                                @include('plugin.tpl.form.text',[
                                'data'=>[
                                          'name'=>'footer_copy',
                                          'title'=>'底部版权',
                                          'tips'=>'',
                                          'value'=>$footer_copy?? '',
                                          'rq'=>''
                              ]])


                            </div>


                            <div class="layui-tab-item ">

                                @include('plugin.tpl.form.textarea',[
                                   'data'=>[
                                             'name'=>'tongji_script',
                                             'title'=>'统计代码',
                                             'tips'=>'',
                                             'value'=>$tongji_script ?? '',
                                             'rq'=>''
                                     ]])
                                @include('plugin.tpl.form.textarea',[
                                  'data'=>[
                                            'name'=>'kefu_script',
                                            'title'=>'客服代码',
                                            'tips'=>'',
                                            'value'=>$kefu_script ?? '',
                                            'rq'=>''
                                    ]])


                            </div>

                            <div class="layui-tab-item ">
                                @include('plugin.tpl.form.seo',[
                                       'data'=>[
                                           'seo_title'=>$seo_title??'',
                                           'seo_key'=>$seo_key??'',
                                           'seo_desc'=>$seo_desc??'',

                                          ]
                                  ])
                            </div>
                            <div class="layui-tab-item ">

                                @include('plugin.tpl.form.textarea',[
                                   'data'=>[
                                             'name'=>'qq',
                                             'title'=>'业务代表',
                                             'tips'=>'',
                                             'value'=>$qq ?? '',
                                             'mark'=>'多个用|分割',
                                             'rq'=>''
                                     ]])
                                @include('plugin.tpl.form.text',[
                                  'data'=>[
                                            'name'=>'qq4',
                                            'title'=>'技术客服',
                                            'tips'=>'',
                                            'value'=>$qq4 ?? '',
                                            'rq'=>''
                                    ]])

                            </div>

                            <div class="layui-tab-item">
                                @include('plugin.tpl.form.textarea',[
                                 'data'=>[
                                           'name'=>'about',
                                           'title'=>'关于我们',
                                           'tips'=>'',
                                           'value'=>$about?? '',
                                           'rq'=>''
                               ]])

                            </div>
                            <div class="layui-tab-item ">

                                @include('plugin.tpl.form.text',[
                                   'data'=>[
                                             'name'=>'email_end_day',
                                             'title'=>'准备到期几天提醒',
                                             'tips'=>'请输入数字',
                                             'mark'=>'',
                                             'value'=>$email_end_day ?? '7',
                                             'rq'=>'number'
                                     ]])
                                @include('admin.tpl.form.radio',[
                                  'data'=>[
                                  'name'=>'email_end_day_numbers',
                                  'title'=>'准备到期几天提醒次数',
                                  'mark'=>'',
                                  'tips'=>'',
                                  'rq'=>'rq',
                                  'on_id'=>$email_end_day_numbers??1,
                                  'value'=>'',
                                  'list'=>[
                                      'type'=>'',
                                      'data'=>[
                                                [
                                                'id'=>'1',
                                                'name'=>'每天都通知'
                                                ],
                                                  [
                                                'id'=>'2',
                                                'name'=>'通知一次'
                                                ]
                                          ]
                                  ]
                              ]])
                                @include('plugin.tpl.form.textarea',[
                                 'data'=>[
                                           'name'=>'email_recipient',
                                           'title'=>'接受邮件通知邮箱',
                                           'mark'=>'多个用|分割',
                                           'tips'=>'',
                                           'value'=>$email_recipient ?? '',
                                           'rq'=>''
                                   ]])
                                @include('admin.tpl.form.radio',[
                                   'data'=>[
                                   'name'=>'email_send_type',
                                   'title'=>'发送邮件形式',
                                   'mark'=>'',
                                   'tips'=>'',
                                   'rq'=>'rq',
                                   'on_id'=>$email_send_type??2,
                                   'list'=>[
                                       'type'=>'',
                                       'data'=>[
                                                 [
                                                 'id'=>'1',
                                                 'name'=>'队列'
                                                 ],
                                                   [
                                                 'id'=>'2',
                                                 'name'=>'直接'
                                                 ]
                                           ]
                                   ]
                               ]])

                            </div>
                            <div class="layui-tab-item ">
                                @include('plugin.tpl.form.text',[
                                  'data'=>[
                                            'name'=>'domain_api',
                                            'title'=>'域名API地址',
                                            'tips'=>'',
                                            'mark'=>'',
                                            'value'=>$domain_api ?? '',
                                            'rq'=>'text'
                                    ]])
                                @include('plugin.tpl.form.text',[
                                 'data'=>[
                                           'name'=>'domain_key',
                                           'title'=>'域名API密钥',
                                           'tips'=>'',
                                           'mark'=>'',
                                           'value'=>$domain_key ?? '',
                                           'rq'=>'text'
                                   ]])
                                @include('plugin.tpl.form.text',[
                                   'data'=>[
                                             'name'=>'domain_rate',
                                             'title'=>'域名成本价上加多少百分点，',
                                             'tips'=>'请输入数字',
                                             'mark'=>'请输入数字，单位（%）',
                                             'value'=>$domain_rate ?? '10',
                                             'rq'=>'number'
                                     ]])
                                @include('plugin.tpl.form.text',[
                                 'data'=>[
                                           'name'=>'domain_renewal_rate',
                                           'title'=>'域名在注册时价格上加多少百分点，',
                                           'tips'=>'请输入数字',
                                           'mark'=>'请输入数字，单位（%）',
                                           'value'=>$domain_renewal_rate ?? '10',
                                           'rq'=>'number'
                                   ]])
                                @include('plugin.tpl.form.text',[
                                 'data'=>[
                                           'name'=>'domain_market_rate',
                                           'title'=>'域名市场价上加多少百分点，',
                                           'tips'=>'请输入数字',
                                           'mark'=>'请输入数字，单位（%）',
                                           'value'=>$domain_market_rate ?? '40',
                                           'rq'=>'number'
                                   ]])


                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="config">确认保存</button>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>


@endsection
@section('foot_js')
    <script>
        layui.use(['index', 'form'], function () {
            var $ = layui.$
                , jquery = $
                , form = layui.form

            form.on('submit(config)', function (obj) {
                //提交修改
                $.ajax({
                    url: '{{ action($controller.'@store') }}'
                    , method: 'post'
                    , data: obj.field
                    , success: function (res) {
                        layer.msg(res.msg);
                    }
                });

                return false;
            });


        });
    </script>

@endsection